package form.element;

import form.FormField;

public class Input extends FormField
{
	public Input(String name, String type)
	{
		super(name);
		
		setAttribute("type", type);
	}
	
	@Override
	public String getTagName()
	{
		return "input";
	}
	
	@Override
	public boolean isShortTag()
	{
		return true;
	}
	
	@Override
	protected void prepareValue()
	{
		if (value != null)
		{
			setAttribute("value", value);
		}
	}
}
